package com.youhome.clients.controller;

import com.youhome.common.response.Result;
import com.youhome.common.response.ResultCode;
import com.youhome.service.service.HouseCommonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by chen365 on 2018/06/27.
 */
@RestController
@RequestMapping("/common")
@Api(tags = "公共信息")
public class CommonController {

    @Autowired
    private HouseCommonService houseCommonService;

    @ApiOperation(value = "房屋二级类型", notes = "房屋二级类型", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @GetMapping(value = "/property/subtype")
    public Object propertySubType() {
        return new Result(ResultCode.SUCCESS, houseCommonService.selectHousePropertySubTypeAll());
    }

}
